#include "stm32f10x.h"                  // Device header
#include "Delay.h"

#include "LED.h"
#include "Key.h"
#include "OLED.h"
#include "AD.h"

uint16_t ADValue = 0;


int main(void)
{
	// 初始化
	OLED_Init();
	AD_Init();
	
	OLED_ShowString(1, 1, "AD0:");
	OLED_ShowString(2, 1, "AD1:");
	
	while(1)
	{
		// 显示 ADC_Channel_0 通道对应的 ADC 值
		ADValue = AD_GetValue(ADC_Channel_0);
		OLED_ShowNum(1, 9, ADValue, 4);
		
		// 显示 ADC_Channel_1 通道对应的 ADC 值
		ADValue = AD_GetValue(ADC_Channel_3);
		OLED_ShowNum(2, 9, ADValue, 4);
		
		Delay_ms(100);
	}
}